import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage'
import Vue from 'vue'
import {UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"

//用户管理
const getUserList = (params)=>getAction("/user/getUserList",params);
const queryPermissionsByUser = (params)=>postAction("/function/findMenuByPNumber",params);
const getCurrentPriceLimit = (params)=>getAction("/user/getCurrentPriceLimit",params);

//系统配置
const getCurrentSystemConfig = (params)=>getAction("/systemConfig/getCurrentInfo",params);
const fileSizeLimit = (params)=>getAction("/systemConfig/fileSizeLimit",params);

//平台参数
const getPlatformConfigByKey = (params)=>getAction("/platformConfig/getInfoByKey",params);

//商品管理
const getMaterialByParam = (params)=>getAction("/material/getMaterialByParam",params);
const getMaterialByBarCode = (params)=>getAction("/material/getMaterialByBarCode",params);
const queryMaterialCategoryTreeList = (params)=>getAction("/materialCategory/getMaterialCategoryTree",params);
const getMaterialBySelect = (params)=>getAction("/material/findBySelect",params);

//序列号
const getEnableSerialNumberList = (params)=>getAction("/serialNumber/getEnableSerialNumberList",params);

//机构管理
const queryOrganizationTreeList = (params)=>getAction("/organization/getOrganizationTree",params);
const getAllOrganizationTreeByUser = (params)=>getAction("/organization/getAllOrganizationTreeByUser",params);

//账户管理
const getAccount = (params)=>getAction("/account/getAccount",params);

//经手人管理
const getPersonByType = (params)=>getAction("/person/getPersonByType",params);

//收支项目
const findInOutItemByParam = (params)=>getAction("/inOutItem/findBySelect",params);

//车辆
const addCar = (params)=>postAction("/api/plugin/car-plugin/car/add",params);
const editCar = (params)=>putAction("/api/plugin/car-plugin/car/update",params);

//客户跟进
const addCustomerFollow = (params)=>postAction("/api/plugin/customer-follow/customerFollow/add",params);
const editCustomerFollow = (params)=>putAction("/api/plugin/customer-follow/customerFollow/update",params);

//固定资产
const addFixAsset = (params)=>postAction("/api/plugin/fix-asset/fixAsset/add",params);
const editFixAsset = (params)=>putAction("/api/plugin/fix-asset/fixAsset/update",params);
const checkFixAsset = (params)=>getAction("/api/plugin/fix-asset/fixAsset/checkCodeIsExist",params);
const queryFixAssetCategoryTreeList = (params)=>getAction("/api/plugin/fix-asset/fixAssetCategory/getFixAssetCategoryTree",params);
const queryFixAssetCategoryById = (params)=>getAction("/api/plugin/fix-asset/fixAssetCategory/findById",params);
const checkFixAssetCategory = (params)=>getAction("/api/plugin/fix-asset/fixAssetCategory/checkIsNameExist",params);

//业绩提成
const addCommision = (params)=>postAction("/api/plugin/commision/commision/add",params);
const editCommision = (params)=>putAction("/api/plugin/commision/commision/update",params);
const getBeginPrice = (params)=>getAction("/api/plugin/commision/commision/getBeginPrice",params);

//供应商|客户|会员
const findBySelectSup = (params)=>postAction("/supplier/findBySelect_sup",params);
const findBySelectCus = (params)=>postAction("/supplier/findBySelect_cus",params);
const findBySelectOrgan = (params)=>postAction("/supplier/findBySelect_organ",params);

//单据相关
const findDepotHeadTotalPay = (params)=>getAction("/depotHead/findTotalPay",params);
const findStockByDepotAndBarCode = (params)=>getAction("/depotItem/findStockByDepotAndBarCode",params);
const findAccountHeadTotalPay = (params)=>getAction("/accountHead/findTotalPay",params);
const findBillDetailByNumber = (params)=>getAction("/depotHead/getDetailByNumber",params);
const findFinancialDetailByNumber = (params)=>getAction("/accountHead/getDetailByNumber",params);
const getBatchNumberList = (params)=>getAction("/depotItem/getBatchNumberList",params);

//生产管理
const addBomMaterial = (params)=>postAction("/api/plugin/produce/bom/material/save",params);
const editBomMaterial = (params)=>putAction("/api/plugin/produce/bom/material/updateById",params);
const addBomProcess = (params)=>postAction("/api/plugin/produce/bom/process/save",params);
const editBomProcess = (params)=>putAction("/api/plugin/produce/bom/process/updateById",params);
const pullMaterial = (params)=>postAction("/api/plugin/produce/task/pullMaterial",params);
const batchPullMaterial = (params)=>postAction("/api/plugin/produce/task/batchPullMaterial",params);
const buildPurchaseApply = (params)=>postAction("/api/plugin/produce/task/buildPurchaseApply",params);
const returnMaterial = (params)=>postAction("/api/plugin/produce/task/returnMaterial",params);
const useMaterial = (params)=>postAction("/api/plugin/produce/task/useMaterial",params);
const batchUseMaterial = (params)=>postAction("/api/plugin/produce/task/batchUseMaterial",params);
const doProcessDetail = (params)=>postAction("/api/plugin/produce/task/doProcessDetail",params);
const changeProcess = (params)=>postAction("/api/plugin/produce/task/changeProcess",params);
const doCheck = (params)=>postAction("/api/plugin/produce/task/doCheck",params);
const doInStock = (params)=>postAction("/api/plugin/produce/task/doInStock",params);
const doFinish = (params)=>postAction("/api/plugin/produce/task/doFinish",params);
const getTaskInfoById = (params)=>getAction("/api/plugin/produce/task/getTaskInfoById",params);
const doTaskPay = (params)=>postAction("/api/plugin/produce/task/doTaskPay",params);
const getTaskInfoByNo = (params)=>getAction("/api/plugin/produce/task/getTaskInfoByNo",params);
const cancelProduceLog = (params)=>postAction("/api/plugin/produce/task/cancelProduceLog",params);

//总账管理
const addSubject = (params)=>postAction("/api/plugin/general-ledger/subject/add",params);
const editSubject = (params)=>putAction("/api/plugin/general-ledger/subject/updateById",params);
const checkSubjectCode = (params)=>getAction("/api/plugin/general-ledger/subject/checkCodeIsExist",params);
const checkSubjectName = (params)=>getAction("/api/plugin/general-ledger/subject/checkNameIsExist",params);
const editSubjectBegin = (params)=>putAction("/api/plugin/general-ledger/subjectBegin/edit",params);

//工作流
const addWorkflowDesign = (params)=>postAction("/api/plugin/workflow/workflowDesign/add",params);
const editWorkflowDesign = (params)=>putAction("/api/plugin/workflow/workflowDesign/update",params);
const checkBillType = (params)=>getAction("/api/plugin/workflow/workflowDesign/checkBillTypeIsExist",params);
const addWorkflowTask = (params)=>postAction("/api/plugin/workflow/workflowTask/add",params);
const addWorkflowDetail = (params)=>postAction("/api/plugin/workflow/workflowDetail/add",params);
const editWorkflowDetail = (params)=>putAction("/api/plugin/workflow/workflowDetail/update",params);

//单据打印设置
const getBillPrint = (params)=>getAction("/api/plugin/bill-print/billPrint/info",params);
const saveBillPrint = (params)=>postAction("/api/plugin/bill-print/billPrint/save",params);
const getAllNeedByParam = (params)=>getAction("/api/plugin/bill-print/billPrint/getAllNeedByParam",params);

//条码打印设置
const getPrintBarcode = (params)=>getAction("/api/plugin/print-barcode/printBarcode/info",params);
const savePrintBarcode = (params)=>postAction("/api/plugin/print-barcode/printBarcode/save",params);
const getAllMaterial = (params)=>getAction("/api/plugin/print-barcode/printBarcode/getAllMaterial",params);

export {
  getUserList,
  queryPermissionsByUser,
  getCurrentPriceLimit,
  getCurrentSystemConfig,
  fileSizeLimit,
  getPlatformConfigByKey,
  getMaterialByParam,
  getMaterialByBarCode,
  queryMaterialCategoryTreeList,
  getMaterialBySelect,
  getEnableSerialNumberList,
  queryOrganizationTreeList,
  getAllOrganizationTreeByUser,
  getAccount,
  getPersonByType,
  findInOutItemByParam,
  addCar,
  editCar,
  addCustomerFollow,
  editCustomerFollow,
  addFixAsset,
  editFixAsset,
  checkFixAsset,
  queryFixAssetCategoryTreeList,
  queryFixAssetCategoryById,
  checkFixAssetCategory,
  addCommision,
  editCommision,
  getBeginPrice,
  findBySelectSup,
  findBySelectCus,
  findBySelectOrgan,
  findDepotHeadTotalPay,
  findStockByDepotAndBarCode,
  findAccountHeadTotalPay,
  findBillDetailByNumber,
  findFinancialDetailByNumber,
  getBatchNumberList,
  addBomMaterial,
  editBomMaterial,
  addBomProcess,
  editBomProcess,
  pullMaterial,
  batchPullMaterial,
  buildPurchaseApply,
  returnMaterial,
  useMaterial,
  batchUseMaterial,
  doProcessDetail,
  changeProcess,
  doCheck,
  doInStock,
  doFinish,
  getTaskInfoById,
  doTaskPay,
  getTaskInfoByNo,
  cancelProduceLog,
  addSubject,
  editSubject,
  checkSubjectCode,
  checkSubjectName,
  editSubjectBegin,
  addWorkflowDesign,
  editWorkflowDesign,
  checkBillType,
  addWorkflowTask,
  addWorkflowDetail,
  editWorkflowDetail,
  getBillPrint,
  saveBillPrint,
  getAllNeedByParam,
  getPrintBarcode,
  savePrintBarcode,
  getAllMaterial
}



